package com.golxen.framework.redis;


import com.golxen.framework.common.ConfigPlugin;
import sun.plugin2.main.server.AbstractPlugin;

public class RedisPlugin {

    static RedisPlugin instance = null;

    public static void start() {
        if (instance != null) {
            return;
        }

        instance = new RedisPlugin();

        if (!ConfigPlugin.active()) {
            throw new RuntimeException("plugin depend on ConfigPlugin not active!!");
        }
        
        // 启动redis
        RedisManger.initConfig();
    }

    public static boolean active() {
        return instance != null;
    }

}
